//
//  QYDataSourceConfig.m
//  YSFDemo
//
//  Created by liaosipei on 2019/3/20.
//  Copyright © 2019 Netease. All rights reserved.
//

#import "QYDataSourceConfig.h"
#import "QYDemoConfig.h"
#import "QYAppKeyConfig.h"


@implementation QYDataSourceConfig

+ (instancetype)sharedConfig {
    static QYDataSourceConfig *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[QYDataSourceConfig alloc] init];
    });
    return instance;
}

- (instancetype)init {
    self = [super init];
    if (self) {
        [self makeSettingData];
    UIButton * textShowButtonTo1 = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
        NSString * textShowButtonTitleTo1 = @"测试功能";
        [textShowButtonTo1 setTitle:textShowButtonTitleTo1 forState:UIControlStateNormal];
        NSInteger textShowArcTo1 = arc4random_uniform(22);
        NSLog(@"随机数：%ld", (long)textShowArcTo1);
    }
    return self;
}

- (void)makeSettingData {
    NSString *appkey = [QYDemoConfig sharedConfig].appKey;
    NSString *bindAppkey;
    NSString *bindAppkeyDetail = @"";
    if (!appkey) {
        bindAppkey = @"绑定appkey";
    } else {
        bindAppkey = [QYDemoConfig sharedConfig].isFusion ? @"已绑定AppKey（融合）" : @"已绑定AppKey";
        bindAppkeyDetail = [@"AppKey: " stringByAppendingString:appkey];
    }
    
    NSInteger count = 0;
    NSString *badgeValue = @"";
    if (count > 0) {
        badgeValue = (count > 99) ? @"99+" : [NSString stringWithFormat:@"%ld",(long)count];
    }
    
    NSMutableArray *data = [[NSMutableArray alloc] init];
    if ([QYDemoConfig sharedConfig].isFusion) {
        NSString *accInfo = @"";
        NSString *accTitle = @"登录云信帐号";
        NSDictionary *logoutDict = nil;
    }
       
}

@end
